package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.SaleOrderLogisticsMapper;
import com.ly.heart.domain.SaleOrderLogisticsEntity;
import javax.annotation.Resource;
import com.ly.heart.service.ISaleOrderLogisticsService;

/**
 * 销售订单物流跟踪Service业务层处理
 * 
 * @author wutao
 * @date 2024-06-30
 */
@Service
public class SaleOrderLogisticsServiceImpl extends ServiceImpl<SaleOrderLogisticsMapper, SaleOrderLogisticsEntity> implements ISaleOrderLogisticsService {

    @Resource
    private SaleOrderLogisticsMapper saleOrderLogisticsMapper;

    /**
     * 查询销售订单物流跟踪
     * 
     * @param id 销售订单物流跟踪ID
     * @return 销售订单物流跟踪
     */
    @Override
    public SaleOrderLogisticsEntity selectSaleOrderLogisticsById(String id)
    {
        return saleOrderLogisticsMapper.selectSaleOrderLogisticsById(id);
    }

    /**
     * 查询销售订单物流跟踪列表
     * 
     * @param saleOrderLogistics 销售订单物流跟踪
     * @return 销售订单物流跟踪
     */
    @Override
    public List<SaleOrderLogisticsEntity> selectSaleOrderLogisticsList(SaleOrderLogisticsEntity saleOrderLogistics)
    {
        return saleOrderLogisticsMapper.selectSaleOrderLogisticsList(saleOrderLogistics);
    }

    /**
     * 新增销售订单物流跟踪
     * 
     * @param saleOrderLogistics 销售订单物流跟踪
     * @return 结果
     */
    @Override
    public int insertSaleOrderLogistics(SaleOrderLogisticsEntity saleOrderLogistics)
    {
        saleOrderLogistics.setCreateTime(DateUtils.getNowDate());
        return saleOrderLogisticsMapper.insertSaleOrderLogistics(saleOrderLogistics);
    }

    /**
     * 修改销售订单物流跟踪
     * 
     * @param saleOrderLogistics 销售订单物流跟踪
     * @return 结果
     */
    @Override
    public int updateSaleOrderLogistics(SaleOrderLogisticsEntity saleOrderLogistics)
    {
        saleOrderLogistics.setUpdateTime(DateUtils.getNowDate());
        return saleOrderLogisticsMapper.updateSaleOrderLogistics(saleOrderLogistics);
    }

    /**
     * 批量删除销售订单物流跟踪
     * 
     * @param ids 需要删除的销售订单物流跟踪ID
     * @return 结果
     */
    @Override
    public int deleteSaleOrderLogisticsByIds(String[] ids)
    {
        return saleOrderLogisticsMapper.deleteSaleOrderLogisticsByIds(ids);
    }

    /**
     * 删除销售订单物流跟踪信息
     * 
     * @param id 销售订单物流跟踪ID
     * @return 结果
     */
    @Override
    public int deleteSaleOrderLogisticsById(String id)
    {
        return saleOrderLogisticsMapper.deleteSaleOrderLogisticsById(id);
    }
}
